/**
 * @author 鍚存倍
 * @since 2022/10/13
 * 12:56
 */
package com.windgo.controller.admin;

import com.windgo.bean.MarketFootprint;
import com.windgo.bean.common.BasePageInfo;
import com.windgo.bean.common.BaseRespVo;
import com.windgo.bean.common.CommonData;
import com.windgo.service.FootprintService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/footprint")
public class FootprintController {
      @Autowired
    FootprintService footprintService;
      /*@RequestMapping("list")
    public BaseRespVo list(BasePageInfo basePageInfo,Integer id){
          System.out.println("1");
          CommonData<MarketFootprint> data = footprintService.list(basePageInfo, id);
          return BaseRespVo.ok(data);
      }

       */
      @RequestMapping(value = "list")
      @RequiresPermissions("perms[admin:footprint:list]")
      public BaseRespVo list(BasePageInfo basePageInfo,Integer userId,Integer goodsId){
         // System.out.println("1");
          CommonData<MarketFootprint> data = footprintService.search(basePageInfo, userId, goodsId);
          return BaseRespVo.ok(data);
      }

}
